A security protocol has become ubiquitous along with rapid development of a communication network. However, researchers tend to design the security protocol while discarding the security of a first message so that an attacker may forge or retransmit arbitrarily the first message for the purpose of attacking the security protocol. In fact, the security of the first message is disregarded with an insignificant influence and at most a waste of resources in the majority of communication networks except some special ones, e.g., an Ultra Wideband (UWB) communication network. Ultra Wideband refers to carrier-free communication where data is transmitted in a sine wave narrow pulse on the order of nanoseconds to microseconds. The majority of devices in the Ultra Wideband communication network are low-power and low-consumption devices (powered with a battery) with rather precious resources of power, communication, storage, etc., so the security of the first message has to be considered to design their applicable security protocol.
At present, in a general method for addressing the security of a first message of a security protocol, a Message Integrity Code (MIC) or a Message Authentication Code (MAC), both of which function to prevent the first message of the security protocol from being forged, is calculated on the first message of the security protocol from pre-shared private information. However, the inventors have identified, during making the invention, at least the following technical drawback present in the prior art: the MIC or the MAC is calculated on all of parameters in the first message of the security protocol from the pre-shared private information in the foregoing method, which may be computationally extensive and consequently waste computational resources.